Installation
npm install --save @types/babel__code-frame
Summary
This package contains type definitions for @babel/code-frame (https://github.com/babel/babel/tree/master/packages/babel-code-frame).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__code-frame.
export interface SourceLocation {
start: { line: number; column?: number | undefined };
end?: { line: number; column?: number | undefined } | undefined;
}
export function codeFrameColumns(
rawLines: string,
location: SourceLocation,
options?: BabelCodeFrameOptions,
): string;
export interface BabelCodeFrameOptions {
highlightCode?: boolean | undefined;
linesAbove?: number | undefined;
linesBelow?: number | undefined;
forceColor?: boolean | undefined;
message?: string | undefined;
}
export default function codeFrame(
rawLines: string,
lineNumber: number,
colNumber: number,
options?: BabelCodeFrameOptions,
): string;
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:04 GMT
- Dependencies: none
Credits
These definitions were written by Mohsen Azimi, and Forbes Lindesay.